<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>Getting Started: Serving Web Content</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link th:href="@{ /style/css/AdminLTE.css}" rel="stylesheet">
    <link rel="shortcut icon" th:href=" @{ /style/icons/fweblogo-16.ico}" type="image/x-icon" />
    <!-- bootstrap样式表（必选  -->
    <link rel="stylesheet" th:href=" @{ /style/css/bootstrap.css}">
    <!-- font-awesome字体图标样式表（必选） -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <!-- ionicons图标样式表（必选） -->
    <link rel="stylesheet" th:href=" @{ /style/icons/css/ionicons.min.css}">
    <!-- iCheck复选框美化样式表（必选） -->
    <link rel="stylesheet" th:href=" @{ /assets-3rd/iCheck/all.css}">
    <!-- AdminLTE样式表（必选） -->
    <link rel="stylesheet" th:href=" @{ /style/css/AdminLTE.css}">
    <!-- 皮肤样式表（必选） -->
    <link rel="stylesheet" th:href=" @{ /style/css/skins/_all-skins.css}">
    <!-- jQuery.spinner数字增减器样式表（必选）） -->
    <link rel="stylesheet" th:href=" @{ /style/css/bootstrap-spinner.css}">
    <!-- gritter提示框样式表（必选） -->
    <link rel="stylesheet" th:href=" @{ /style/css/jquery.gritter.css}">
    <link rel="stylesheet" th:href=" @{ /style/css/gritter.extra.css}">

    <link rel="stylesheet" type="text/css" th:href=" @{ /style/css/fweb/css.css}">
</head>
<body class="hold-transition skin-green-light sidebar-mini fixed fs_14">
<div class="wrapper">

    <!-- 顶部导航 -->
    <header class="main-header">
        <!-- Logo存放位置 -->
        <a href="#" class="logo">
            <!-- 50x50px的mini logo -->
            <span class="logo-mini">shiro</span>
            <!-- logo -->
            <span class="logo-lg">权限管理系统</span>
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- 左侧边框切换图标  -->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button" onresize="alert('aaa');">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <!-- 顶部导航右侧展示区域 -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- Messages: style can be found in dropdown.less-->
                    <li class="dropdown messages-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-envelope-o"></i>
                            <span class="label label-success">4</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 4 messages</li>
                            <li>
                                <!-- inner menu: contains the actual data -->
                                <ul class="menu">
                                    <li><!-- start message -->
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src=" @{/style/images/user2-160x160.jpg" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <h4>
                                                Support Team
                                                <small><i class="fa fa-clock-o"></i> 5 mins</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <!-- end message -->
                                    <li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src=" @{/style/images/user3-128x128.jpg" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <h4>
                                                AdminLTE Design Team
                                                <small><i class="fa fa-clock-o"></i> 2 hours</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src=" @{ /style/images/user4-128x128.jpg" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <h4>
                                                Developers
                                                <small><i class="fa fa-clock-o"></i> Today</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src=" @{ /style/images/user3-128x128.jpg" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <h4>
                                                Sales Department
                                                <small><i class="fa fa-clock-o"></i> Yesterday</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <div class="pull-left">
                                                <img src=" @{ /style/images/user4-128x128.jpg" class="img-circle"
                                                     alt="User Image">
                                            </div>
                                            <h4>
                                                Reviewers
                                                <small><i class="fa fa-clock-o"></i> 2 days</small>
                                            </h4>
                                            <p>Why not buy a new awesome theme?</p>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer"><a href="#">See All Messages</a></li>
                        </ul>
                    </li>
                    <!-- Notifications: style can be found in dropdown.less -->
                    <li class="dropdown notifications-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-bell-o"></i>
                            <span class="label label-warning">10</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 10 notifications</li>
                            <li>
                                <!-- inner menu: contains the actual data -->
                                <ul class="menu">
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-users text-aqua"></i> 5 new members joined today
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-warning text-yellow"></i> Very long description here that
                                            may not fit into the
                                            page and may cause design problems
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-users text-red"></i> 5 new members joined
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-shopping-cart text-green"></i> 25 sales made
                                        </a>
                                    </li>
                                    <li>
                                        <a href="#">
                                            <i class="fa fa-user text-light-blue"></i> You changed your username
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <li class="footer"><a href="#">View all</a></li>
                        </ul>
                    </li>
                    <!-- Tasks: style can be found in dropdown.less -->
                    <li class="dropdown tasks-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-flag-o"></i>
                            <span class="label label-danger">9</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="header">You have 9 tasks</li>
                            <li>
                                <!-- inner menu: contains the actual data -->
                                <ul class="menu">
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Design some buttons
                                                <small class="pull-right">20%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-aqua" style="width: 20%"
                                                     role="progressbar" aria-valuenow="20" aria-valuemin="0"
                                                     aria-valuemax="100">
                                                    <span class="sr-only">20% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Create a nice theme
                                                <small class="pull-right">40%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-green" style="width: 40%"
                                                     role="progressbar" aria-valuenow="20" aria-valuemin="0"
                                                     aria-valuemax="100">
                                                    <span class="sr-only">40% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Some task I need to do
                                                <small class="pull-right">60%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-red" style="width: 60%"
                                                     role="progressbar" aria-valuenow="20" aria-valuemin="0"
                                                     aria-valuemax="100">
                                                    <span class="sr-only">60% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                    <li><!-- Task item -->
                                        <a href="#">
                                            <h3>
                                                Make beautiful transitions
                                                <small class="pull-right">80%</small>
                                            </h3>
                                            <div class="progress xs">
                                                <div class="progress-bar progress-bar-yellow" style="width: 80%"
                                                     role="progressbar" aria-valuenow="20" aria-valuemin="0"
                                                     aria-valuemax="100">
                                                    <span class="sr-only">80% Complete</span>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <!-- end task item -->
                                </ul>
                            </li>
                            <li class="footer">
                                <a href="#">View all tasks</a>
                            </li>
                        </ul>
                    </li>
                    <!-- User Account: style can be found in dropdown.less -->
                    <li class="dropdown user user-menu">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src=" @{ /style/images/user2-160x160.jpg}" class="user-image" alt="User Image">
                            <span class="hidden-xs">用户的信息</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- User image -->
                            <li class="user-header">
                                <img src=" @{ /style/images/user2-160x160.jpg}" class="img-circle" alt="User Image">

                                <p>
                                    超级管理员 ${test}
                                    <small>创建时间</small>
                                </p>
                            </li>
                            <!-- Menu Body -->
                            <li class="user-body">
                                <div class="row">
                                    <div class="col-xs-4 text-center">
                                        <a href="#">菜单一</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">菜单二</a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="#">菜单三</a>
                                    </div>
                                </div>
                                <!-- /.row -->
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">注销</a>
                                </div>
                                <div class="pull-right">
                                    <a href=" /login/logout" class="btn btn-default btn-flat" >退出登录</a>
                                </div>
                            </li>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <li>
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- 左侧菜单 -->
    <aside class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- search form -->
            <form action="#" method="get" class="sidebar-form">
                <div class="input-group">
                    <input id="menuSearch" type="text" name="q" class="form-control" placeholder="Search">
                    <span class="input-group-btn">
                <button type="button" name="search" id="search-btn" class="btn btn-flat" onclick="search_menu()"><i class="fa fa-search"></i>
                </button>
              </span>
                </div>
            </form>
            <!-- /.search form -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
            </ul>
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- 主体内容 -->
    <div class="content-wrapper" id="content-wrapper" style="min-height: 421px;background-color: #ecf0f5;">
        <!--bootstrap tab风格 多标签页-->
        <div class="content-tabs">
            <nav class="page-tabs menuTabs tab-ui-menu" id="tab-menu">
                <div class="page-tabs-content" style="margin-left: 0px;">

                </div>
            </nav>
            <button class="roll-nav roll-right tabRight" onclick="scrollTabLeft()" style="right:160px;">
                <i class="fa fa-caret-left"></i>
            </button>
            <button class="roll-nav roll-right tabRight" onclick="scrollTabRight()">
                <i class="fa fa-caret-right" style="margin-left: 3px;"></i>
            </button>
            <div class="btn-group roll-nav roll-right">
                <button class="dropdown tabClose" data-toggle="dropdown">
                    <p class="note"> 页签操作<i class="fa fa-caret-down note" style="padding-left: 3px;"></i></p>
                </button>
                <ul class="dropdown-menu dropdown-menu-right" style="min-width: 128px;">
                    <li><a class="tabReload" href="javascript:refreshTab();">刷新当前</a></li>
                    <li><a class="tabCloseCurrent" href="javascript:closeCurrentTab();">关闭当前</a></li>
                    <li><a class="tabCloseAll" href="javascript:closeOtherTabs(true);">全部关闭</a></li>
                    <li><a class="tabCloseOther" href="javascript:closeOtherTabs();">除此之外全部关闭</a></li>
                </ul>
            </div>
            <button class="roll-nav roll-right fullscreen" onclick="App.handleFullScreen(this)"><i
                    class="fa fa-arrows-alt"></i></button>
        </div>
        <div class="content-iframe " style="background-color: #ecf0f5; ">
            <div class="tab-content " id="tab-content" style="background-color: #ecf0f5; ">

            </div>
        </div>
    </div>

    <!-- 右侧边栏（全局设置区域） -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <!-- <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i class="fa fa-home"></i></a></li> -->
            <li id="control-sidebar-settings-tab-li"><a id="aaatest" href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <!-- <div class="tab-pane" id="control-sidebar-home-tab">


            </div> -->
            <!-- /.tab-pane -->
            <!-- Stats tab content -->
            <!-- <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div> -->
            <!-- /.tab-pane -->
            <!-- Settings tab content -->
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <div class="row">
                    <label class="col-xs-5">字体尺寸</label>
                    <div class="input-group spinner col-xs-6" data-trigger="spinner" id="font-size-spinner">
                        <input type="text" id="font-size-spinner-input" class="form-control text-center" value="0" data-max="20" data-min="0" data-step="2">
                        <div class="input-group-addon">
                            <a href="javascript:;" class="spin-up" data-spin="up"><i class="fa fa-caret-up"></i></a>
                            <a href="javascript:;" class="spin-down" data-spin="down"><i class="fa fa-caret-down"></i></a>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /.tab-pane -->
        </div>
    </aside>
    <!-- 右侧边栏背景 -->
    <div class="control-sidebar-bg"></div>
</div>

<!-- jQuery 2.2.3 -->
<script th:src=" @{ /js/commons/jquery-2.2.3.min.js}"></script>
<!-- Bootstrap 3.3.6 （必选）  -->
<script th:src=" @{ /js/commons/bootstrap.min.js}"></script>
<!-- Slimscroll滚动条优化插件 （必选）  -->
<script th:src=" @{ /js/commons/jquery.slimscroll.min.js}"></script>
<!-- iCheck复选框优化插件 （必选） -->
<script th:src=" @{ /assets-3rd/iCheck/iCheck.min.js}"></script>
<!-- FastClick快速点击插件，防延迟 （可选） -->
<script th:src=" @{ /js/commons/fastclick.js}"></script>
<!-- AdminLTE App（必选） -->
<script th:src=" @{ /js/commons/app.js}"></script>
<!-- 数字增殖器 （必选） -->
<script th:src=" @{ /js/commons/jquery.spinner.min.js}"></script>
<!-- 提示框 （必选） -->
<script th:src=" @{ /js/commons/jquery.gritter.min.js}" type="text/javascript"></script>
<!-- 字体控制插件 （必选） -->
<script th:src=" @{ /js/fweb/fweb_fs.js}"></script>
<!--  主控右侧边栏生成及全局设置插件（必选） -->
<script th:src=" @{ /js/fweb/fweb_iframe.js}"></script>
<!-- 主控使用iframe模式，对AdminLTE做的调整（必选）-->
<script th:src=" @{ /js/commons/app_iframe.js}"></script>

<script type="text/javascript">

    function logout(){
        $.ajax({
            url:" @{/login/logout",
            method:"get",
            success:function(){
                window.location.href="${config.base()}login.jsp"
            }
        })
    }



    /**
     * 本地搜索菜单
     */
    function search_menu() {
        //要搜索的值
        var text = $('input[name=q]').val();

        if(!text)
            return;

        var $ul = $('.sidebar-menu');
        $ul.find("a.nav-link").each(function () {
            var $a = $(this).css("border","");

            //判断是否含有要搜索的字符串
            if ($a.children("span.menu-text").text().indexOf(text) >= 0) {

                //如果a标签的父级是隐藏的就展开
                $ul = $a.parents("ul");

                if ($ul.is(":hidden")) {
                    $a.parents("ul").prev().click();
                }

                //点击该菜单
                $a.click().css("border","1px solid");

                return false;
            }
        });
    }

    $(function () {

        $.ajax({
            url:"menu/getByuid?uid=101",
            method:"get",
            success:function (data) {
                alert("success");
                console.log(data)

            }

        })




        App.setbasePath(" @{/");
        App.setGlobalImgPath("style/images/");

        addTabs({
            id: '10008',
            title: '欢迎页',
            close: false,
            url: 'pages/crumb-manager.html',
            urlType: "relative"
        });



        App.fixIframeCotent();

        var menus = [
            {
                id: "9000",
                text: "header",
                icon: "",
                isHeader: true
            },
            {
                id: "90021",
                text: "组织机构管理",
                url: " /orginazation/index",
                targetType: "iframe-tab",
                icon: "fa fa-circle-o"
            },
            {
                id: "90021",
                text: "岗位管理",
                url: "forms/advanced_iframe.html",
                targetType: "iframe-tab",
                icon: "fa fa-circle-o"
            },
            {
                id: "9002",
                text: "角色管理",
                icon: "fa fa-edit",
                children: [
                    {
                        id: "90021",
                        text: "平台角色",
                        url: "forms/advanced_iframe.html",
                        targetType: "iframe-tab",
                        icon: "fa fa-circle-o"
                    },
                    {
                        id: "90021",
                        text: "机构角色",
                        url: "forms/advanced_iframe.html",
                        targetType: "iframe-tab",
                        icon: "fa fa-circle-o"
                    }
                ]
            },
            {
                id: "9002",
                text: "资源管理",
                icon: "fa fa-edit",
                url: "forms/advanced_iframe.html",
                targetType: "iframe-tab",
                children: [
                    {
                        id: "90021",
                        text: "平台资源",
                        url: "forms/advanced_iframe.html",
                        targetType: "iframe-tab",
                        icon: "fa fa-circle-o"
                    },
                    {
                        id: "90021",
                        text: "机构资源",
                        url: "forms/advanced_iframe.html",
                        targetType: "iframe-tab",
                        icon: "fa fa-circle-o"
                    }
                ]
            }
            ,
            {
                id: "9002",
                text: "用户信息管理",
                icon: "fa fa-edit",
                url: "forms/advanced_iframe.html",
                targetType: "iframe-tab"
            }
        ];
        $('.sidebar-menu').sidebarMenu({data: menus});

        //为输入框绑定回车事件
        $("#menuSearch").keypress(function(e){
            var eCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
            if (eCode == 13){
                search_menu();
                return false;
            }
        });

    });
</script>
</body>
</html>